/**
 * Licensee: 
 * License Type: Evaluation
 */
package ormsamples;

import org.orm.*;
public class DeletePrueba1Data {
	public void deleteTestData() throws PersistentException {
		PersistentTransaction t = orm.Prueba1PersistentManager.instance().getSession().beginTransaction();
		try {
			orm.DAOFactory lDAOFactory = orm.DAOFactory.getDAOFactory();
			orm.dao.Com_logDAO lormCom_logDAO = lDAOFactory.getCom_logDAO();
			orm.Com_log lormCom_log = lormCom_logDAO.loadCom_logByQuery(null, null);
			// Delete the persistent object
			lormCom_logDAO.delete(lormCom_log);
			orm.dao.Com_precioDAO lormCom_precioDAO = lDAOFactory.getCom_precioDAO();
			orm.Com_precio lormCom_precio = lormCom_precioDAO.loadCom_precioByQuery(null, null);
			// Delete the persistent object
			lormCom_precioDAO.delete(lormCom_precio);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			DeletePrueba1Data deletePrueba1Data = new DeletePrueba1Data();
			try {
				deletePrueba1Data.deleteTestData();
			}
			finally {
				orm.Prueba1PersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
